In 3G radio communication field, in order to adapt the bit rate of transmission channel, the bit of a bit sequence is repeated or punctured, which is referred as to rate matching.
3 Gpp 25.212 specifies an algorithm of rate matching, the algorithm for solving the rate matching pattern will be described as below.
The input bit sequence before rate matching is denoted by xi1, di2, xi3, . . . xiXi(, wherein the parameters Xi, eini, eplus, and eminus denote data amount, the initial offset of the rate matching, the update step size of the rate matching, and the adjustment step size of the rate matching respectively.
The algorithmic for solving the rate matching pattern by pseudo-code is:
if puncturing is to be performed e = eini-- initial error between current and desired puncturing ratio m = 1-- index of current bit do while m <= Xi  e = e − eminus  -- update error  if e <= 0 then  -- check if bit number m should be punctured    set bit xi,m to δ where δ∉ {0, 1}   e = e + eplus  -- update error  end if  m = m + 1   -- next bit  end do else  e = eini  -- initial error between current and desired   puncturing ratio  m = 1  -- index of current bit  do while m <= Xi   e = e − eminus   -- update error   do while e <= 0   -- check if bit number m should be repeated   repeat bit xi,m   e = e + eplus -- update error  end do  m = m + 1   -- next bit end doend if
Wherein, the repeated bit is placed directly after the original one.
Current rate matching algorithm is excessively abstract, thus hard to be understood and realized.